package com.base.commonlib.base;

/**
 * Date：2019/4/9 下午4:27
 * Creator：arvin
 * Des：
 */

public abstract class BaseSimpleFragment extends BaseFragment {


    protected  void showPb()
    {
        if(mContext instanceof BaseSimpleActivity)
        {
            ((BaseSimpleActivity)mContext).showPb();
        }else if(mContext instanceof BaseViewActivity)
        {
            ((BaseViewActivity)mContext).showPb();
        }
    }

    protected  void hidePb(){
        if(mContext instanceof BaseSimpleActivity)
        {
            ((BaseSimpleActivity)mContext).hidePb();
        }else if(mContext instanceof BaseViewActivity)
        {
            ((BaseViewActivity)mContext).hidePb();
        }
    }

    protected  void showError(){
        if(mContext instanceof BaseSimpleActivity)
        {
            ((BaseSimpleActivity)mContext).showError();
        }else if(mContext instanceof BaseViewActivity)
        {
            ((BaseViewActivity)mContext).showError();
        }
    }

    protected  void showPb_mes(String mes){
        if(mContext instanceof BaseSimpleActivity)
        {
            ((BaseSimpleActivity)mContext).showPb_mes(mes);
        }else if(mContext instanceof BaseViewActivity)
        {
            ((BaseViewActivity)mContext).showPb_mes(mes);
        }
    }

    protected  void hidePb_mes(){
        if(mContext instanceof BaseSimpleActivity)
        {
            ((BaseSimpleActivity)mContext).hidePb_mes();
        }else if(mContext instanceof BaseViewActivity)
        {
            ((BaseViewActivity)mContext).hidePb_mes();
        }
    }
}
